
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin, Page
from os.path import basename

class News(CMSPlugin):
    """
    News
    """
    title = models.CharField(_("title"),max_length=255)
    describle = models.CharField(_("title"),max_length=255)
    content = models.TextField(_("content"),blank=True, null=True)
    
    def __unicode__(self):
        if self.describle:
            return self.describle[:40]
        return "<empty>"
